1. Field of the Invention
The present invention relates to a communication system including a local area network (LAN) and a speech network.
2. Description of the Related Art
In a prior art communication system, including a LAN and a speech network the LAN is connected to LAN telephone gateways, and the speech network is connected to private branch exchanges (PBXs) which are connected to telephone sets. Also, the PBXx are connected to the respective ones of the LAN telephone gateways. Therefore, a call connection between two of the telephone sets can be carried out by using one speech path (connection route) using the LAN or one speech path using the speech network.
Generally, a speech path using the LAN requires a low charge, while a speech path using the speech network requires a high charge. Therefore, when a call connection is required between two telephone sets, such a call connection is going to be carried out by a speech path using the LAN. Only when a speech path using the LAN is impossible, is the above-mentioned call connection carried out by a speech path using the speech network.
In the prior art communication system, however, after the speech path using the speech network is realized, even if a speech path using the LAN can be realized, it is impossible to automatically switch the speech path using the speech network to the speech path using the LAN, which increases the charges.
It is an object of the present invention to provide a communication system capable of automatically switching a speech path using a speech network to a speech path using a LAN when the speech path using the LAN can be realized.
According to the present invention, in a communication system including a LAN, first and second LAN telephone gateways connected to the LAN, a speech network, first and second PBXs connected to the speech network and to the first and second LAN telephone gateways, respectively, and first and second telephone sets connected to the first and second PBXs, respectively, a first speech path is realized from the first telephone set via the first PBX to the first LAN telephone gateway. Then, it is determined whether a second speech path from the first LAN telephone gateway via the LAN, the second LAN telephone network, and the second PBX to the second telephone set is possible or impossible. Then, after the second speech path is determined to be possible, the second speech path is realized. After the second speech path is determined to be impossible, a third speech path is realized from the first LAN telephone gateway via the first PBX, the speech network and the second PBX to the second telephone set. When the third speech path is realized, it is determined whether or not a fourth speech path from the first LAN telephone gateway via the LAN and the second LAN telephone gateway to the second PBX is possible. If the fourth speech path is determined to be possible, the fourth speech path is realized and a part of the third speech path from the first LAN telephone gateway via the first PBX and said speech network to the second PBX is disconnected.